home *** CD-ROM | disk | FTP | other *** search
/ Invisible Universe / Invisible Universe (1995)(Voyager)[Mac-PC].iso / mac / UNIVERSE / SHARED.DIR / 01048_Script_1048 < prev    next >
Text File  |  1995-11-21  |  3KB  |  174 lines

  1. on fixEmpties startNum
  2.   
  3.   if voidP(startNum) then set startNum = 1
  4.   
  5.   set BigList = value(field "o movies")
  6.   
  7.   repeat with i = startNum to count(BigList)
  8.     
  9.     saveMovie
  10.     
  11.     if the freeBytes < 1500000 then
  12.       unloadCast 1,1000
  13.       if the machineType <> 256 then maxmem() 
  14.     end if
  15.     
  16.     set mov = getAt(BigList, i)
  17.     
  18.     --put ">>> movie #" & i & ": " & mov
  19.     go to movie mov
  20.     
  21.     setEmptyScripts
  22.     
  23.   end repeat
  24.   
  25.   saveMovie
  26.   
  27.   put "done."
  28.   
  29. end fixEmpties
  30.  
  31.  
  32.  
  33.  
  34.  
  35. on setEmptyScripts 
  36.   
  37.   set sta = the number of cast "Start Pict"
  38.   set nm = the name of cast (sta+1)
  39.   set cnStart = the number of cast nm
  40.   
  41.   set ena = the number of cast "end Pict"
  42.   set nm = the name of cast (ena-1)
  43.   set cnEnd = the number of cast nm
  44.   
  45.   put cnStart && cnEnd
  46.   
  47.   repeat with i = cnStart to cnEnd
  48.     put i & char 1 to 60 of the scripttext of cast i
  49.     if the scriptText of cast i = empty then
  50.       put "cast " & i
  51.       set the scriptText of cast i = "on mouseDown" & RETURN & "  doRectClick([])" & RETURN & "end"
  52.     end if    
  53.     
  54.   end repeat
  55.   
  56.   asdf
  57. end setEmptyScripts
  58.  
  59.  
  60.  
  61. on collectAllTerms startNum
  62.   global gFile
  63.   
  64.   if not voidP(gFile) then gFile(mDispose)
  65.   
  66.   set gFile = fileIO(mNew, "write", the moviePath & "bold terms full list")
  67.   
  68.   if voidP(startNum) then set startNum = 1
  69.   
  70.   set BigList = value(field "o movies")
  71.   
  72.   repeat with i = startNum to count(BigList)
  73.     
  74.     saveMovie
  75.     
  76.     if the freeBytes < 1500000 then
  77.       unloadCast 1,1000
  78.       if the machineType <> 256 then maxmem() 
  79.     end if
  80.     
  81.     set mov = getAt(BigList, i)
  82.     
  83.     --put ">>> movie #" & i & ": " & mov
  84.     go to movie mov
  85.     
  86.     collectTerms
  87.     
  88.   end repeat
  89.   
  90.   saveMovie
  91.   
  92.   gFile(mDispose)
  93.   
  94.   put "done."
  95.   
  96. end collectAllTerms
  97.  
  98.  
  99. on collectTerms
  100.   
  101.   global gFile
  102.   
  103.   set sta = the number of cast "Start Pict"
  104.   set nm = the name of cast (sta+1)
  105.   set cnStart = the number of cast nm
  106.   
  107.   set ena = the number of cast "End Pict"
  108.   set nm = the name of cast (ena-1)
  109.   set cnEnd = the number of cast nm
  110.   
  111.   put cnStart && cnEnd
  112.   
  113.   
  114.   repeat with i = cnStart to cnEnd
  115.     put line 2 of the scriptText of cast i into s
  116.     
  117.     if char 3 of s = "d" then next repeat
  118.     
  119.     --put char 1 to 40 of s
  120.     
  121.     set theList = 0
  122.     
  123.     do s
  124.     
  125.     --put ">>>full list" & theList
  126.     
  127.     set c = count(theList)
  128.     
  129.     repeat with j = 1 to c
  130.       
  131.       set listItem = getAt(theList, j)
  132.       --put ">>> item " & j && listItem
  133.       
  134.       if getat(listItem, 1) = "B" then
  135.         
  136.         gFile(mWriteString, getAt(listItem, 3) & ">" & getAt(listItem, 2) & "," & the movie && i & RETURN)      
  137.         
  138.         --put getAt(listItem, 3) & ">" & getAt(listItem, 2) & RETURN      
  139.         
  140.       end if
  141.       
  142.     end repeat
  143.     
  144.   end repeat
  145.   
  146.   
  147.   
  148. end collectTerms
  149.  
  150. on dumpCONames
  151.   set theList = value(field "o.dir")
  152.   
  153.   set c = count(theList)
  154.   
  155.   
  156.   repeat with i = 1 to c 
  157.     put getAt(getAt(theList, i), 1) & "," & getPropAt(theList, i)
  158.   end repeat
  159.   
  160. end dumpCONames
  161.  
  162. on dumpPONames
  163.   set theList = value(field "poetry.dir")
  164.   
  165.   set c = count(theList)
  166.   
  167.   
  168.   repeat with i = 1 to c 
  169. --    put getAt(getAt(theList, i), 1) & "," & getPropAt(theList, i)
  170.     put getAt(getAt(theList, i), 1)-- & "," & getPropAt(theList, i)
  171.   end repeat
  172.   
  173. end dumpPONames
  174.